
<div class="global-header clearfix">
  <div class="global-header-container container"><a title="{{$city->name}}爱上租，让租房简单有趣！" href="{{url('/')}}" class="logo"><img src="{{web_static('pc/v3/assets/logo.jpg')}}" alt="{{$city->name}}公寓出租租房网站"/></a>
    <div class="city"><i>{{$city->name}}</i><span class="current-city icon icon-arrowDown"></span></div>
    @php $hotWords = with(new \Common\Java\Cms\HotWords())->pcHotWords($city->telephone_code);@endphp
    <div class="search-box">
      <div class="search-box-input">
        <input type="text" placeholder="输入区域、小区名" maxlength="32" value="{{str_limit(request('q'),64,'')}}" class="textinput placeholder"/><a class="search-box-btn">马上找房</a><a href="{{seo_url(\Common\Define\Route\WebRoute::MAP)}}" class="icon icon-city"></a>
      </div>
      <div class="hot-list">
        @if(is_object($hotWords) && isset($hotWords->rows) &&is_array($hotWords->rows))
          @foreach ($hotWords->rows as $item)<a href="{{$item->link_url}}" class="hot-list-item">{{$item->hot_word}}</a>
          @endforeach
        @endif
      </div>
      <div class="search-list">
        <ul class="search-item-content">
          {{-- li --}}
          {{-- .seach-item-left 康乐新村 --}}
          {{-- .seach-item-right 西湖区（8套） --}}
        </ul>
      </div>
      <div class="search-list-hot">
        <p>热门搜索</p>
        <ul>
          @if(is_object($hotWords) && isset($hotWords->rows) &&is_array($hotWords->rows))
            @foreach ($hotWords->rows as $item)
              <li><a href="{{$item->link_url}}" class="hot-list-item">{{$item->hot_word}}</a></li>
            @endforeach
          @endif
        </ul>
      </div>
    </div>
    <div class="download-app"><a href="{{seo_url(\Common\Define\Route\WebRoute::DOWNLOAD)}}" class="current-app icon icon-app"><span>APP下载</span></a></div>
    <div class="select-city">
      <ul class="select-city-container">
        @foreach (Common\Model\Com\City::getAllCity() as $item)
        @if(in_array($url->getSegment(1), \Common\Define\View\WebCitySwitch::items()))
          @php $cityUrl = $url->withSubDomain($item->identifier)->withPath($url->getSegment(1))->withoutQueryParameter('q')->toString() @endphp
        @elseif(in_array($url->getSegment(1), \Common\Define\View\WebCitySwitch::huodong()))
          @php $cityUrl = $url->withSubDomain($item->identifier)->withPath($url->getSegment(1).'/'.$url->getSegment(2))->withoutQueryParameter('q')->toString() @endphp
        @elseif(in_array($url->getSegment(1), array('zhuanti')))
          @php $cityUrl = $url->withSubDomain($item->identifier)->withPath($url->getSegment(1).'/'.str_replace($city->identifier,$item->identifier,$url->getSegment(2)))->withoutQueryParameter('q')->toString() @endphp
        @else
          @php $cityUrl = $url->withSubDomain($item->identifier)->withPath('')->withoutQueryParameter('q')->toString() @endphp
        @endif
        <li><a href="{{$cityUrl}}" class="city-item @if($city->id == $item->id) active @endif">{{$item->name}}</a></li>
        @endforeach
      </ul>
    </div>
  </div>
</div>
<div class="new-nav nav clearfix">
  <div class="content">
    @foreach (Common\Define\View\WebNav::items() as $item)<a href="{{seo_url($item['url'])}}" class="nav-item @if(in_array($url->getSegment(1),$item['active'])) active @endif">{{$item['name']}}</a>
    @endforeach
  </div>
</div>